

#import "GameScene.h"


@implementation GameScene

-(void) updateWithDelta:(float)delta
{
	transY += 0.075f;
}


- (void) render
{
	
	static const GLfloat squareVertices[] = {
        50,  50, // 1
		250,  50,// 2
        50,   250, // 3
		250,   250, // 4
    };
	
	
    static const GLubyte squareColors[] = {
        0, 0, 255, 255,
        255, 0, 0, 255,
        255, 255, 0, 255,
        0, 255, 0, 255,
    };
    
    glTranslatef(0.0f, (GLfloat)(sinf(transY)/0.15f), 0.0f);
	
    glVertexPointer(2, GL_FLOAT, 0, squareVertices);
    glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors);
    
    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
	
	
}

@end
